<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta name="renderer" content="webkit" />
	<meta http-equiv="Pragma" content="no-store" />
	<meta http-equiv="Access-Control-Allow-Origin" content="*">
	<title></title>
	<link rel="stylesheet" href="../../css/retrieve/swiper.min.css">

	<script type="text/javascript" src="../../js/jquery-2.2.3.min.js"></script>


	<link href="../../css/layer.css" rel="stylesheet">
	<link href="../../css/bootstrap.min.css" rel="stylesheet">
	<script type="text/javascript" src="../../js/ichart.1.2.1.min.js"></script>
	<script type="text/javascript" src="../../js/layui/layui.js"></script>
	<link href="../../js/layui/css/layui.css" rel="stylesheet">
	<script type="text/javascript" src="../../js/itnetcao.js"></script>



	<style type="text/css">
		body{
			font-size:16px;
		}

		* {
			padding: 0px;
			margin: 0px;
		}

		#Head {
			width: 100%;
			height: 2.8rem;
			background-color: #FFC90C;
		}

		#HeadOne {
			margin: 0px auto;
			padding: 0.2rem;
		}

		#HeadOneLeft {
			float: left;
			margin-left: 0.5rem;
			width: 4rem;
		}

		#HeadOne span {
			color: #8C8C8C;
			font-size: 0.2rem;
		}

		#HeadOne li {
			color: #FFFFFF;
			list-style: none;
			font-size: 0.4rem;
		}

		.Gap {
			height: 0.2rem;
			background-color: #F3F3F3;
		}

		#Content {
			background-color: #FFFFFF;
		}

		#ContentDL {
			margin: 0.2rem;
			font-size: 0.2rem;
		}

		#Business {
			border-bottom: 1px solid #8C8C8C;
			height: 0.6rem;
		}

		#Business li {
			list-style: none;
			float: left;
			height: 0.3rem;
			width: 50%;
			text-align: center;
			font-size: 0.2rem;
			line-height: 0.3rem;
		}

		a {
			color: #000000;
		}

		#BuyOne input {
			width: 4.5rem;
			float: left;
			margin: 0.2rem;
		}

		#BuyH span {
			color: #EF9A30;
		}

		#buyp {
			font-family: "黑体";
			margin: 0.2rem;
			font-size: 0.2rem;
		}

		#BuyH {
			width: 5rem;
			margin: 0.2rem;
			font-size: 0.2rem;
		}

		#Buy p {
			font-size: 0.2rem;
			font-family: "黑体";
			margin: 0.2rem;
		}

		#BuyButton {
			margin: 0px auto;
			width: 90%;
		}

		#BuyButton Button {
			background-color: #EF9A30;
			width: 100%;
			-webkit-border-radius: 1.5rem;
			color: #FFFFFF;
			border-radius: 1.5rem;
			outline-color: #FFFFFF;
		}

		#SearchOne {
			width: 100%;
			background-color: #F3F3F3;
		}

		#Search {
			margin: 0px auto;
			width: 90%;
		}

		#Search input {
			width: 100%;
		}

		#Show dt {
			margin: 0.5rem 0.1rem;
		}

		#Show dd p {
			margin: 0.1rem 0.1rem;
		}

		#Show dl img {
			border-radius: 50%;
			width: 1.5rem;
			height: 1.5rem;
		}

		#Show dl {
			margin-left: 0.2rem;
			display: flex;
		}

		#Show dl dd {
			margin-left: 0.5rem;
		}

		#Show button {
			border-radius: 1.5rem;
			outline-color: #FFFFFF;
			width: 2rem;
			color: #FFFFFF;
			background-color: #FFC90C;
		}

		.ShowName {
			font-size: 0.2rem;
		}

		.ShowOne {
			font-size: 0.2rem;
		}

		.ShowT {
			font-size: 0.2rem;
		}

		#ShowD {
			margin: 0.2rem;
		}

		#ShowP {
			margin: 0.2rem;
		}
		#kj_foot {
			position: fixed;
			bottom: 0;
				width: 100%;
				height: 1.4rem;
				margin-top: 0.6rem;
				line-height: 2rem;
				background-color: #fff;
			}

	</style>

</head>

<body>
	<!--头部-->
	<div id="Head" style='height:100px;'>

		<div id="HeadOne">

			<div id="HeadOneLeft" style='margin-top:10px;margin-left:20px;width:40%;'>
				<ul>
					<li style='height:20px;line-height:20px;font-size:14px;'>当前价</li>
					<li style='height:20px;line-height:20px;font-size:14px;'><span class='dangqianjiage' style="font-size:14px;"></span>$</li>
					<li style='height:20px;line-height:20px;font-size:14px;'>≈<span class='renmingbijiage'></span> CNY</li>
				</ul>
			</div>

			<div id="HeadOneRight" style='margin-top:10px;margin-left:50%;width:50%;'>
				<ul>
					<li style='height:20px;line-height:20px;font-size:14px;'>最高：<span class='zuigao'></span> $ &nbsp; 最低：<span class='zuidi'></span> $</li>
					<li style='height:20px;line-height:20px;font-size:14px;'>幅：<span class='fudu'></span> %</li>
					<li style='height:20px;line-height:20px;font-size:14px;'>当前求购订单量：<span class='qiugoushuliang'>32000</span></li>
					<li style='height:20px;line-height:20px;font-size:14px;'>当前出售订单量：<span class='chushoudingdan'></span></li>
				</ul>
			</div>

		</div>
	</div>

	<!--折线图-->
	<div id="Content">
		<dl id="ContentDL">
			<dt>XTS价格表</dt>
			<dd></dd>
		</dl>
		<div id='ichart-render'></div>
	</div>
	<style type='text/css'>
	.cust_a{
		height:30px;
		line-height:30px;
		text-decoration:none;
		font-size:14px;
		width:100%;
	}
	a{
		text-decoration:none !important;
	}
	a:active{
		text-decoration:none !important;
	}
	</style>
	<div id="Business" style='margin-top:10px;border:0px;'>
		<ul>
			<li><b><a style='width:80%;' class='cust_a cust_a_mairu layui-btn layui-btn-warm layui-btn-sm' href="javascript:;">买入XTS</a></b></li>
			<li><b><a style='width:80%;' class='cust_a cust_a_maichu layui-btn layui-btn-warm layui-btn-sm' href="javascript:;">卖出XTS</a></b></li>
		</ul>
	</div <div id="Buy">
	<div id="BuyOne" style='margin-top:10px;margin-left:10%;margin-top:30px;'>
		<input style='width:40%;' type="text" id="Number" class="form-control" placeholder="请输入购买数量" />
		<input style='width:40%;margin-left:5%;' type="text" id="Price" class="form-control" placeholder="请输入购买单价" />
	</div>
	<script type='text/javascript'>
	$(function() {
		$(".cust_a_mairu").click(function() {
			$("#Number").attr("placeholder", "请输入买入数量");
			$("#Price").attr("placeholder", "请输入买入单价");
			$("#submit1").text("确认买入");

			$(".cust_a_mairu").removeClass("layui-btn-warm");
			$(".cust_a_mairu").addClass("layui-btn-normal");
			$(".cust_a_maichu").removeClass("layui-btn-normal");
			$(".cust_a_maichu").addClass("layui-btn-warm");
		})
		$(".cust_a_maichu").click(function() {
			$("#Number").attr("placeholder", "请输入卖出数量");
			$("#Price").attr("placeholder", "请输入卖出单价");
			$("#submit1").text("确认卖出");

			$(".cust_a_maichu").removeClass("layui-btn-warm");
			$(".cust_a_maichu").addClass("layui-btn-normal");
			$(".cust_a_mairu").removeClass("layui-btn-normal");
			$(".cust_a_mairu").addClass("layui-btn-warm");
		})
	})
	</script>
	<div id="BuyH">
		<p>预计收入：<span class='yujihuode'>0.00</span>$</p>
	</div>

	<div id="BuyButton">
		<button type="submit" id="submit1" class="btn btn-default">确认买入</button>
	</div>
	<script type='text/javascript'>
	// 出售或请购
	var bili = 7;
	$(function() {

		$("#Number, #Price").keyup(function() {
			if($("#Number").val().trim().length != 0 && $("#Price").val().trim().length != 0) {
				$(".yujihuode").text((parseFloat($("#Number").val().trim()) * parseFloat($("#Price").val().trim())).toFixed(4));
			}else {
				$(".yujihuode").text(0);
			}
		})

		$("#submit1").click(function() {
			var tishi = $("#submit1").text().substring(2);
			if($("#Number").val().trim().length == 0) {
				alert("请输入" + tishi + "数量.");
				return;
			}
			if($("#Price").val().trim().length == 0) {
				alert("请输入" + tishi + "单价.");
				return;
			}

			$(".yujihuode").text(parseFloat($(".renmingbijiage").text()) * parseFloat($("#Number").val().trim()));


			var url = localStorage.getItem("url") + "/buy/controller/BuyOrSellSaveAPP.do";
			var buyType = "";
			if(tishi == "买入") {
				buyType = 2;
			}
			if(tishi == "卖出") {
				buyType = 1;
			}
			var data = "buyType=" + buyType + "&buyNumber=" + $("#Number").val().trim()
			+ "&buyPrice=" + $("#Price").val().trim() + "&buyState=1&buyUserId=" + jQuery.parseJSON(localStorage.getItem("miningmachine_user")).userId;
			itcao.itGetAjaxTrueBigData(url, data).done(function(result) {
				var json = jQuery.parseJSON(result);
				if(json.state) {
					alert(json.value);
				}else {
					alert("操作失败:" + json.value);
				}
			})
		})
	})
	</script>
	</div>
	<div id="Business" style='margin-top:20px;border-bottom:0px;' align="center">
		<ul style='width:80%;'>
			<li><b><a class='qc_a_1'>求购列表</a></b></li>
			<li><b><a class='qc_a_2'>出售列表</a></b></li>
		</ul>

	</div>
	<style type='text/css'>
	.qc_a_1, .qc_a_2{
		width:100%;display:inline-block;
		height:30px;
		line-height:30px;
		background:#00BFFF;
	}
	.qc_a_1{
		border-radius:5px 0px 0px 5px;
		-webkit-border-radius:5px 0px 0px 5px;
	}
	.qc_a_2{
		border-radius:0px 5px 5px 0px;
		-webkit-border-radius:0px 5px 5px 0px;
	}
	.qc_a_2{
		background:#CCC;
	}
	</style>
	<script type='text/javascript'>
	var qr_a_index = 1;
	$(function() {
		$(".qc_a_1").click(function() {
			$(".qc_a_1").css({"background" : "#00BFFF"});
			$(".qc_a_2").css({"background" : "#CCC"});
			// 加载请购类别
			loadQingGou();
			qr_a_index = 1;
		})
		$(".qc_a_2").click(function() {
			$(".qc_a_1").css({"background" : "#CCC"});
			$(".qc_a_2").css({"background" : "#00BFFF"});
			// 加载出售列表
			loadChuShou();
			qr_a_index = 2;
		})
	})

	function getDataMairuOrMaiChu(index, msg) {
		var url = localStorage.getItem("url") + "/buy/controller/BuyOrSellFindPageBillAPP.do";
		var data = "buyType="+index+"&pc=1&pc=100000&userIphone=" + $(".userIphone").val().trim();
		$(".loadDataPrice").empty();
		itcao.itGetAjaxBigData(url, data).done(function(result) {
			var json = jQuery.parseJSON(result);
			if(json.state == true) {
				for(var i=0; i<json.bean.length; i++) {
					var userImage = "";
					if(itcao.isNull(json.bean[i].userImage) == "") {
						userImage = "../../image/5.jpg";
					}else {
						userImage = localStorage.getItem("url") + "/" + itcao.isNull(json.bean[i].userImage);
					}
					var btn = "";
					if(json.bean[i].buyState == 1) {
						btn = "<button style='width:80px;' onclick='userBillState(this)' data-id='"+json.bean[i].buyId+"' id='submit2' class='btn btn-default'>"+msg+"</button>";
					}else {
						btn = "<button style='width:80px;' type='submit' id='submit2' class='btn btn-default'>交易中</button>";
					}
					$(".loadDataPrice").append("" +
						"<div id='Show' style='margin-top:20px;'>" +
							"<dl>" +
								"<dt><img src='"+userImage+"'/ ></dt>" +
								"<dd id='ShowP' style='width:70%;'>" +
									"<p class='ShowName'><b>"+json.bean[i].userName+"</b></p>" +
									"<p class='ShowOne'>XTS数量：<span id='ShowOneSpan'>"+json.bean[i].buyNumber+"</span></p>" +
									"<p class='ShowOne'>单价："+json.bean[i].buyPrice+"$</p>" +
									"<p class='ShowOne'>总价："+json.bean[i].buyTotalAmount+"$</p>" +
									"<p class='ShowOne'>成交量：0 &nbsp;好评率：99.49%</p>" +
								"</dd>" +
								"<dd id='ShowD'style='width:30%;'>" +
									"<p class='ShowT'><b>"+json.bean[i].buyCny+" CNT</b></p>" +
									"<p class='ShowT'>"+btn+"</p>" +
								"</dd>" +
							"</dl>" +
							"<hr/>" +
						"</div>"
					)
				}
			}
		})
	}

	// 用户确定开始交易
	function userBillState(tis) {
		var target = tis;
		var id = $(tis).attr("data-id");
		var url = localStorage.getItem("url") + "/buy/controller/setBuyOrSellStateAPP.do";
		var data = "userId=" + jQuery.parseJSON(localStorage.getItem("miningmachine_user")).userId
					+ "&buyId=" + id + "&state=3";

		var m = "";
		if(qr_a_index == 1) {
			m = "出售";
		}else {
			m = "买入";
		}

		var html = "" +
			"<div align='center' class='layui-fluid layui-form' style='margin:10px;margin-top:30px;height:320px;width:90%;'>" +
				"<div class='layui-row layui-col-space15'>" +
					"<div class='layui-form-item' style='margin-left:0px;margin-right:0px;padding-left:0px;padding-right:0px;'>" +
						"<label class='layui-form-label' style='width:70px;margin-left:0px;margin-right:0px;padding-left:0px;padding-right:0px;'>手机</label>" +
						"<div class='layui-input-inline' style='width:140px;margin-left:0px;margin-right:0px;padding-left:0px;padding-right:0px;'>" +
							"<input type='text' value='"+jQuery.parseJSON(localStorage.getItem("miningmachine_user")).userIphone+"' disabled placeholder='请输入您的手机号' class='layui-input jiaoYiIphone' style='background:#CCC;'/>" +
						"</div>" +
					"</div>" +
				"<div>" +

				"<div class='layui-row layui-col-space15'>" +
					"<div class='layui-form-item' style='margin-left:0px;margin-right:0px;padding-left:0px;padding-right:0px;'>" +
						"<label class='layui-form-label' style='width:70px;margin-left:0px;margin-right:0px;padding-left:0px;padding-right:0px;'>验证码</label>" +
						"<div class='layui-input-inline' style='width:140px;margin-left:0px;margin-right:0px;padding-left:0px;padding-right:0px;'>" +
							"<input type='text' placeholder='请输入验证码' class='layui-input jiaoYiCode' />" +
						"</div>" +
					"</div>" +
				"<div>" +

				"<div class='layui-row layui-col-space15'>" +
					"<div class='layui-form-item' style='margin-left:0px;margin-right:0px;padding-left:0px;padding-right:0px;'>" +
						"<label class='layui-form-label' style='width:70px;margin-left:0px;margin-right:0px;padding-left:0px;padding-right:0px;'>交易密码</label>" +
						"<div class='layui-input-inline' style='width:140px;margin-left:0px;margin-right:0px;padding-left:0px;padding-right:0px;'>" +
							"<input type='password' placeholder='请输入您的交易密码' class='layui-input jiaoYiPassword' />" +
						"</div>" +
					"</div>" +
				"<div>" +

			"</div>" +
		"";

		layui.use("layer", function(){
			layui.layer.open({
				type : 1,
				content : html,
				area : ['90%', '70%'],
				title : false,
				btn : ["获取验证码", "提交"],
				yes : function(index, layero) {
					// 发送验证码
					if($(".layui-layer-btn0").is(".layui-btn-disabled")) {
						return;
					}
					$(".layui-layer-btn0").addClass("layui-btn-disabled");
					var a = 120;
					var _this = $(".layui-layer-btn0");
					var n = window.setInterval(function() {
						a = a - 1;
						$(_this).text(a + "秒后重新发送");
						if(a == 0) {
							$(_this).removeClass("layui-btn-disabled");
							window.clearInterval(n);
							$(_this).text("获取验证码");
						}
					}, 1000);


					var b = 120;
					tis.guoqidingshiqi = window.setInterval(function() {
						b = b - 1;
						if(b == 0) {
							sessionStorage.setItem("guoqi", "yes");
						}
					}, 1000)

					var iphone = $(".jiaoYiIphone").val();

					localStorage.setItem("iphoneCode", "");

					$.ajax({
						url : localStorage.getItem("url") + "/user/controller/getUserAuthReIPhoneCodeAPP.do",
						type:"post",
						data : "iphone=" + iphone,
						dataType : 'json',
						success:function(json) {
							if(json.state == true) {
								localStorage.setItem("iphoneCode", json.bean);
								layer.msg(json.value, {icon:1, time:1000})
							}else {
								layer.msg("失败:" + json.value, {icon:1, time:1000})
							}
						}
					});

				},
				btn2 : function(index, layero) {
					if(localStorage.getItem("iphoneCode") == undefined) {
						alert("请先发送手机验证码.");
						return false;
					}
					if($(".jiaoYiCode").val().trim().length == 0) {
						alert("请输入验证码");
						return false;
					}
					if($(".jiaoYiCode").val().trim() != localStorage.getItem("iphoneCode").trim()) {
						alert("验证码不正确");
						return false;
					}
					if($(".jiaoYiPassword").val().trim().length == 0) {
						alert("请输入交易密码");
						return false;
					}

					var id = $(target).attr("data-id");
					var type = $(target).attr("data-type");
					var m = "";
					if(type == 1) {
						m = "出售";
					}else {
						m = "买入";
					}

					if(confirm("您确定" + m + "该交易信息?")) {
						itcao.itGetAjaxBigData(url, data).done(function(result) {
							var json = jQuery.parseJSON(result);
							if(json.state == true) {
								alert("成功" + m + ",请通知对方在个人中心查看信息.");
								loadDataUl();
							}else {
								alert(m + "失败:" + json.value);
							}
						})
					}else {
						return false;
					}

				}
			})
		})
	}


	function loadQingGou() {
		// 加载请购列表
		getDataMairuOrMaiChu(2, "出售");
	}

	function loadChuShou() {
		// 加载出售列表
		getDataMairuOrMaiChu(1, "购买");
	}

	function loadDataUl() {
		if(qr_a_index == 1) {
			loadQingGou();
		}else {
			loadChuShou();
		}
	}
	</script>

	<div id="SearchOne" style='margin-top:40px;background:#FFF;'>
		<div class="input-group input-group-sm" id="Search">
			<input type="text" class="form-control userIphone" placeholder="请输入对方手机号查找" />
			<span class="input-group-addon" onclick="loadDataUl();">
			           查找
			</span>
		</div>
	</div>
	<div class='loadDataPrice'>

	</div>
	<!--
	<div id="Show" style='margin-top:20px;'>
		<dl>
			<dt><img src="../../image/5.jpg"/ ></dt>
			<dd id="ShowP" style='width:70%;'>
				<p class="ShowName"><b>西贝</b></p>
				<p class="ShowOne">XTS数量：<span id="ShowOneSpan">9</span></p>
				<p class="ShowOne">单价：9$ &nbsp;总价：9.00$</p>
				<p class="ShowOne">成交量：396 &nbsp;好评率：99.49%</p>
			</dd>
			<dd id="ShowD" style='width:30%;'>
				<p class="ShowT"><b>63.00 CNT</b></p>
				<p class="ShowT"><button style='width:80px;' type="submit" id="submit2" class="btn btn-default">出售</button></p>

			</dd>
		</dl>
		<hr/>
	</div>
	-->

	<script>
		/*var submit2 = document.getElementById("submit2");
		submit2.onclick = function() {
			layer.open({
				content: '是否出售' + document.getElementById("ShowOneSpan").innerText + '个XTS',
				btn: ['确定', '取消'],
				yes: function(index) {
					location.reload();
					layer.close(index);
				}
			});
		};
		var submit1 = document.getElementById("submit1");
		submit1.onclick = function() {

			if (document.getElementById("Number").value == "") {
				layer.open({
					content: '请输入购买数量',
					btn: ['确定'],
					yes: function(index) {
						layer.close(index);
					}
				});
				return false;
			} else if (document.getElementById("Price").value == "") {
				layer.open({
					content: '请输入购买单价',
					btn: ['确定'],
					yes: function(index) {
						layer.close(index);
					}
				});

				return false;
			} else {
				layer.open({
					content: '是否购买' + document.getElementById("Number").value + '个XTS',
					btn: ['确定', '取消'],
					yes: function(index) {
						location.reload();
						layer.close(index);
					}
				});
				return true;
			}

		};*/

		$(function() {
			loadQingGou();

			// 得到最高的价格
			var url = localStorage.getItem("url") + "/user/controller/ExchangeRateFindMaxAPP.do";
			itcao.itGetAjaxBigData(url, data).done(function(result) {
				var json = jQuery.parseJSON(result);
				if(json.state == true) {
					$(".zuigao").text(json.bean);
				}
			})
			// 获取最低价格
			url = localStorage.getItem("url") + "/user/controller/ExchangeRateFindMinAPP.do";
			itcao.itGetAjaxBigData(url, data).done(function(result) {
				var json = jQuery.parseJSON(result);
				if(json.state == true) {
					$(".zuidi").text(json.bean);
				}
			})

			url = localStorage.getItem("url") + "/user/controller/UserFindExchangeRateFindPageAPP.do";
			var data = "pc=1&ps=5&order=exDate desc";

			itcao.itGetAjaxBigData(url, data).done(function(result) {
				var json = jQuery.parseJSON(result);
				if(json.state == true) {
					// 第一条信息为最新的信息  更新头部价格列表
					if(json.bean.length > 0) {
						$(".dangqianjiage").text(json.bean[0].exCurrentPrice);
						$(".renmingbijiage").text(json.bean[0].exConversionCNY);
						bili = json.bean[0].exProportion;
					}
					if(json.bean.length > 1) {
						$(".fudu").text((parseFloat(json.bean[0].exCurrentPrice) - parseFloat(json.bean[1].exCurrentPrice)).toFixed(4));
					}

					var data = new Array();
					for(var i=0; i<json.bean.length; i++) {
						data[data.length] = {
							name: json.bean[i].exDate.substring(5),
							value: json.bean[i].exCurrentPrice,
							color: "rgba(131,166,213,0.9)"
						}
					}
					data = data.sort(itcao.compare("name"))
					var chart = iChart.create({
						render: "ichart-render",
						width: 318,
						height: 200,
						background_color: "#FFFFFF",
						gradient: false,
						color_factor: 0.2,
						border: {
							color: "#404c5d",
							width: 1
						},
						align: "center",
						offsetx: 0,
						offsety: -20,
						sub_option: {
							border: {
								color: "#fefefe",
								width: 1
							},
							label: {
								fontweight: 600,
								fontsize: 12,
								color: "#FFC90C",
								sign: "square",
								sign_size: 12,
								border: {
									color: "#BCBCBC",
									width: 1
								},
								background_color: "#fefefe"
							}
						},
						shadow: true,
						shadow_color: "#fafafa",
						shadow_blur: 10,
						showpercent: false,
						column_width: "70%",
						bar_height: "70%",
						radius: "90%",

						coordinate: {
							width: "92%",
							height: "80%",
							background_color: "rgba(246,246,246,0.05)",
							axis: {
								color: "#bfbfc3",
								width: ["", "", 6, ""]
							},
							grid_color: "#c0c0c0",
							label: {
								fontweight: 500,
								color: "#f5f5f5",
								fontsize: 0
							}
						},
						label: {
							fontweight: 600,
							color: "#FFC90C",
							fontsize: 12
						},
						type: "column2d",
						data: data
					});
					chart.draw();
				}
			})
		});
	</script>
	<script>
	(function() {
		var supportsOrientationChange = 'onorientationchange' in window ? 'orientationchange' : 'resize';
		var timeoutId;
		function setRem() {
			var clientWidth = document.documentElement.clientWidth;
			var nowPX = clientWidth / 1024 * 100;
			document.documentElement.style.fontSize = nowPX + 'px';
		}
		setRem();
		window.addEventListener(supportsOrientationChange, function() {
			clearTimeout(timeoutId);
			timeoutId = setTimeout(function() {
				setRem();
			}, 300);
		}, false);
	})();
	</script>
</body>

</html>
